<?php
class Application_Form_Syllabus extends Zend_Form{
	
	public function __construct($sect){
		parent::__construct();
		$this->setMethod('post');
		
		$section = new Zend_Form_Element_Select('section');
		$section	->setLabel('Section')
					->setRequired(true)
					->addValidator(new Zend_Validate_NotEmpty())
					->setMultiOptions($sect);
		$this->addElement($section);
		
		$annee = new Zend_Form_Element_Select('annee');
		$annee		->setLabel('School year')
					->setRequired(true)
					->addValidator(new Zend_Validate_NotEmpty())
					->setMultiOptions(array(''=>'','1'=>'1','2'=>'2','3'=>'3'));
		$this->addElement($annee);
		
		$recaptcha = new Zend_Service_ReCaptcha('6LfVQMsSAAAAAKRkO3IsPAh4moQdp5mZ3fEn1EVq', '6LfVQMsSAAAAAMBnxJ7zhvi5lcVqYnAYmzgeVT_j');
		$recaptcha->setOption('theme', 'blackglass');
		$captcha = new Zend_Form_Element_Captcha('captcha', array(
					'captcha'        => 'ReCaptcha',
                    'captchaOptions' => array(
                    		'captcha' => 'ReCaptcha',
                            'service' => $recaptcha
					)
		));
        $this->addElement($captcha);
		
		$this->addElement('submit','submit',array(
			'ignore'		=> true,
			'label'			=> 'Search',
		));
		$this->addElement('hash','csrf', array(
			'ignore'		=> true,
		));
	}
}